package com.ruoyi.charge.controller;

import com.ruoyi.charge.domain.ChargingBill;
import com.ruoyi.charge.service.IChargingBillService;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ChargingBillController {
    @Autowired
    IChargingBillService chargingBillService;

    /**
     * 创建充电账单
     *
     * @param chargingBill
     * @return
     */
    //手机端扫码后，由手机端调用
    @GetMapping("/charging/bill/createBill")
    public AjaxResult createBill(ChargingBill chargingBill) {
        boolean isSuccess = chargingBillService.createBill(chargingBill);
        return AjaxResult.success(isSuccess);
    }
}
